package zj.xinxin.web.runner;

import lombok.extern.log4j.Log4j;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;
import zj.xinxin.api.moudle.redis.RedisCacheBusiness;

/**
 * applicationRunner 实现启动自动执行部分方法
 * @author junzhou
 * @date 2022/3/23 10:48
 * @since 1.8
 */
@Component
@Slf4j
public class ApplicationRunnerImpl implements ApplicationRunner {

    @Autowired
    private RedisCacheBusiness redisCacheBusiness;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        log.info("开始拉取缓存数据！");
        /*------------------------  获取部分redis缓存  -----------------------------*/
        redisCacheBusiness.cacheIconList();
        /*------------------------  获取部分redis缓存  -----------------------------*/
    }
}
